﻿@{
	Layout = "~/Views/Shared/_Layout.cshtml";
}

@using Hangerd.Utility;

@model IEnumerable<dPet.Application.DataObjects.HospitalDto>

<div class="clearfix">
	<h4>医院管理</h4>

	<hr />

	<div class="panel panel-default">
		<div class="panel-heading">
			<a href="@Url.Action("Hospital", "Manage")" class="btn btn-sm btn-success" target="_self"><span class="glyphicon glyphicon-plus-sign"></span> 添加医院</a>
		</div>

		<table class="table text-center table-striped table-hover">
			<thead>
				<tr>
					<th class="text-center">医院名称</th>
					<th class="text-center">地址</th>
					<th class="text-center">电话号码</th>
					<th class="text-center">传真号码</th>
					<th class="text-center">创建时间</th>
					<th class="text-center">操作</th>
				</tr>
			</thead>
			<tbody>
				@foreach (var hospital in Model)
				{
					<tr>
						<td>@hospital.Name</td>
						<td title="@hospital.Address">@CommonTools.CutString(hospital.Address, 30, "..")</td>
						<td>@hospital.PhoneNumber</td>
						<td>@hospital.FaxNumber</td>
						<td>@hospital.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")</td>
						<td>
							@Html.ActionLink("编辑", "Hospital", new { id = hospital.Id })
							&nbsp;&nbsp;
							@Html.ActionLink("员工列表", "StaffList", new { hospitalId = hospital.Id })
						</td>
					</tr>
				}
			</tbody>
		</table>
	</div>
</div>

@section scripts {

	<script type="text/javascript">
	</script>
}
